package com.imau.bean;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class TreeEntity implements Serializable
{
    private static final long serialVersionUID = 1L;
    /**节点ID*/
    private String id;

    /**
     * 父节点ID
     */
    private String parentId;

    /**节点名称*/
    private String label;

    /**子节点集合*/
    private List children;


    public TreeEntity(SysDept dept) {

        this.id = dept.getDid();

        this.parentId = dept.getParentId();

        this.children = dept.getChildren();

        this.label = dept.getDeptName();
    }

      public TreeEntity(Permission permission) {

        this.id = permission.getId();

        this.parentId = permission.getParentId();

        this.children = permission.getChildren();

        this.label = permission.getName();
    }
}
